<template>
  <el-config-provider :locale="zhCn" :size="elSize">
    <router-view></router-view>
  </el-config-provider>
</template>

<script setup>
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { useTheme } from '@/hooks/useTheme'
import { useThemeStore } from '@/stores/theme'
import { storeToRefs } from 'pinia'

// 初始化主题风格
const { initTheme } = useTheme()
initTheme()

const themeStore = useThemeStore()
const { elSize } = storeToRefs(themeStore)
</script>
